Hi, In your first try, you used s.length. selection is a single object. so it does not have length property. In your 2nd try, you used g.length. g is geometric bounds and the selection is a single object but you used s . so its threw error. Process : 1. Selection should be multiple. ie., Rectangle 2. loop it (rectangle) and proceed your flow. var s = app.selection; // Selection of multiple rectangle for(var sCnt = 0; sCnt < s.length; sCnt++) { var cObj = s[sCnt]; var g = cObj.geometricBounds; cObj.geometricBounds = [g[0], g[1], g[0] + (g[3] - g[1]), g[1] + (g[2] - g[0])]; } Try this..
... View more